package com.springboot.cloud.goods.service.impl;

import com.springboot.cloud.goods.dao.GoodsRepository;
import com.springboot.cloud.goods.entity.Goods;
import com.springboot.cloud.goods.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * @author godyao
 * @date 2022/3/26
 */
@Service
public class GoodsServiceImpl implements IGoodsService {
    @Autowired
    private GoodsRepository goodsRepository;

    @Override
    public Optional<Goods> findGoodsById(Long id) {
        return goodsRepository.findById(id);
    }
}
